<?php
namespace Home\Controller;
use Common\Controller\HomeController;
use Common\Model\CategoryModel;
use Org\Util\DataTree;
class IndexController extends HomeController  {
	/**
	 * 首页 商城页面
	 */
    public function index(){
		//分配公共头部数据
		$conf = ['js'=>['index'],
			     'css'=>['index']
		];
		$this->assign('conf',$conf);
		//获取分类数据
		$data = (new DataTree())->channelLevel((new CategoryModel())->select(), $pid = 0, $html = "&nbsp;", $fieldPri = 'cid', $fieldPid = 'pid');
		$this->assign('data',$data);
		//dd($data);
		$this->display();
    }
}